<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 100px;
            height: 100px;
            background: red;
            position: relative;
            left: 0px;
            transition: 1s;
        }
        .lili {
            width: 100px;
            height: 100px;
            background: pink;
            position: relative;
            left: 0px;
            transition: 1s;
        }
    </style>
</head>

<body>
    <div class="box"></div>
    <div class="lili"></div>
</body>
<script>
    let box = document.querySelector('.box');
    let lili = document.querySelector('.lili');
    box.onclick = move;
    lili.onclick = move;


    function move() {
        this.style.left = '100px';
    }
    console.log(this);
    /*
        事件调用环境：谁触发事件，函数里面的this指向的就是谁。
        再浏览器的全局环境里，this指向window
        在node.js全局里面，this指向 module.exports
    */ 

</script>

</html>